package config

import (
	shared "github.com/devops-smartbot/devops-smartbot/shared/config"
)

// Config holds ai-gateway runtime configuration.
type Config struct {
	GRPCPort int
	AI struct {
		Provider    string
		OpenAIKey   string
		OllamaHost  string
		AnthropicKey string
	}
}

// FromShared builds config from shared Config.
func FromShared(cfg *shared.Config) Config {
	c := Config{GRPCPort: cfg.App.GRPCPort}
	c.AI.Provider = cfg.AI.Provider
	c.AI.OpenAIKey = cfg.AI.OpenAIKey
	c.AI.OllamaHost = cfg.AI.OllamaHost
	c.AI.AnthropicKey = cfg.AI.AnthropicKey
	return c
}
